Fk:loadTranslationTable{
  ["dajubei__chezhou"] = "掣肘",
  [":dajubei__chezhou"] = "主公技，准备阶段，其他“吴”势力角色依次可以展示并交给你任意张手牌。然后本回合内，这些牌不计入手牌上限，且你不能使用与这些牌名称相同的牌。",

  ["#dajubei__chezhou-give"] = "掣肘：可以展示任意张牌并交给 %src",
  ["@@dajubei__chezhou-turn"] = "掣肘"
}

local chezhou = fk.CreateSkill{
  name = "dajubei__chezhou",
  tags = {Skill.Lord}
}

--- main effect
chezhou:addEffect(fk.EventPhaseStart, {
  anim_type = "drawcard",
  can_trigger = function (self, event, target, player, data)
    if player:hasSkill(chezhou.name) then
      return data.phase == Player.Start and player == target
    end
  end,
  on_cost = Util.TrueFunc,
  on_use = function (self, event, target, player, data)
    local room = player.room
    local wu = table.filter(room:getOtherPlayers(player), function (p)
      return p.kingdom == "wu"
    end)
    for _, p in ipairs(wu) do
      if player.dead then break end
      local cards = room:askToCards(p, {
        include_equip = false,
        min_num = 0,
        max_num = 999,
        skill_name = chezhou.name,
        cancelable = true,
        prompt = "#dajubei__chezhou-give:" .. player.id
      })
      if #cards > 0 then
        room:showCards(cards, p)
        if player.dead then break end
        cards = table.filter(cards, function(id) return room:getCardOwner(id) == p end)
        room:moveCardTo(cards, Card.PlayerHand, player, fk.ReasonGive, chezhou.name, nil, true, p, "@@dajubei__chezhou-turn")
      end
    end
  end
})

--- prohibit
chezhou:addEffect("prohibit", {
  prohibit_use = function (self, player, card)
    if player:usedSkillTimes(chezhou.name, Player.HistoryTurn) > 0 then
      local same = table.find(player:getCardIds("h"), function (id)
        local _card = Fk:getCardById(id, true)
        return _card:getMark("@@dajubei__chezhou-turn") == 1 and _card.trueName == card.trueName
      end)
      if same then
        return true
      end
    end
  end
})

--- maxcards
chezhou:addEffect("maxcards", {
  exclude_from = function (self, player, card)
    if player:usedSkillTimes(chezhou.name, Player.HistoryTurn) > 0 then
      if card:getMark("@@dajubei__chezhou-turn") == 1 then
        return true
      end
    end
  end
})

return chezhou